package com.ruoyi.base.service.impl;

import com.ruoyi.base.domain.BussinessItemVo;
import com.ruoyi.base.domain.PublicToolsVo;
import com.ruoyi.base.mapper.PublicToolsMapper;
import com.ruoyi.base.service.PublicToolsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Service
public class PublicToolsServiceImpl implements PublicToolsService {
    @Autowired
    private PublicToolsMapper publicToolsMapper;
    @Override
    public List<Map<String, Object>> bussinessItemData(BussinessItemVo vo) {
        return publicToolsMapper.bussinessItemData(vo);
    }

    @Override
    public List<Map<String, Object>> segmentRegionTree(PublicToolsVo vo) {
        return publicToolsMapper.segmentRegionTree(vo);
    }

    @Override
    public List<Map<String, Object>> RiverSectionTree(PublicToolsVo vo) {
        List<Map<String, Object>> list = new ArrayList<>();
        List<Map<String, Object>> list1 = publicToolsMapper.riverSectionTree(vo);
        if (list1 != null && list1.size() > 0) {
            for (Map maps : list1) {
                list.add(maps);
            }
        }
        return list;
    }

    @Override
    public Map<String, Object> manualMonitordataLastTime(PublicToolsVo vo) {
        return publicToolsMapper.manualMonitordataLastTime(vo);
    }

    @Override
    public List<Map<String, Object>> lakeSegmentTree(PublicToolsVo vo) {
        return publicToolsMapper.lakeSegmentTree(vo);
    }

    @Override
    public List<Map<String, Object>> lakeSegmentRegionTree(PublicToolsVo vo) {
        return publicToolsMapper.lakeSegmentRegionTree(vo);
    }
}
